home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
dax1.exe
/
CP
/
CP.H
next >
Wrap
Text File
|
1992-07-15
|
4KB
|
80 lines
// ╔════════════════════════════════════════════════════════════════════╗
// ║ ║
// ║ module: cp.h ║
// ║ ║
// ║ This software is provided as is and carries no warranty ║
// ║ whatsoever. Novell disclaims and excludes any and all implied ║
// ║ warranties of merchantability, title and fitness for a particular ║
// ║ purpose. Novell does not warrant that the software will satisfy ║
// ║ your requirements or that the software is without defect or error ║
// ║ or that operation of the software will be uninterrupted. You are ║
// ║ using the software at your risk. The software is not a product ║
// ║ of Novell, Inc. or any of subsidiaries. ║
// ║ ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ maintenance history: ║
// ║ level date pi description ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ 001 01/23/92 kl initial release. ║
// ║ 002 07/14/92 kl windows port. ║
// ╚════════════════════════════════════════════════════════════════════╝
#if !defined(CPDHDR)
#define CPDHDR
#include <h/extypes.h>
#include <cp/cpdbg.h>
#define CPPKTSIG 0x53445043 // 'CPDS' swapped
#define CPMAXMSG 500 // 500 bytes for DAP Message
//
// This header is put in front of the message before we put in on the
// wire. The serverID is assigned by the application server CP Layer
// when the first request is sent in.
//
typedef struct {
UINT32 signature; // signature for packet CPPKTSIG
UINT32 serverID; // server ID for this session
UINT8 reserved[6]; // hang on to six bytes for later
}CPHEADER;
//
// The following structure is the layout of messages exchanged
// between the communication protocol support layers of our
// client/server application. This is the structure of the message
// being sent across the wire.
//
typedef struct {
//
// 'cp' contains info needed by the Communication Protocol
// layers running on the client and server machines. We
// put this in front of the actual messages being exchanged
// between the client/server protocol.
//
CPHEADER cphdr;
//
// 'msg' contains the info being exchanged between the actual
// client/server protocol layer (DAP). From here (the CP Layer)
// we don't care what's in there, so treat it as an array of
// characters.
//
UINT8 msg[CPMAXMSG];
}CPMESSAGE;
#define CP_SUCCESS 0
#define CP_SESSION_IN_PROGRESS 101
#define CP_NO_TRANSPORT 102
#define CP_TRANSPORT_ERROR 103
#define CP_UNKNOWN_SERVER 104
#define CP_NO_MESSAGE 105
#define CP_RESOURCE_ERROR 106
#define CP_TRANSPORT_BUSY 107
#define CP_UNKNOWN_CLIENT 108
#define CP_NO_SESSION_IN_PROGRESS 109
#endif